<?php
/**
 * Created by PhpStorm.
 * User: R.Ice
 * Date: 2018/8/23
 * Time: 15:38
 * name:新增跟进记录
 * url:/erpFollowUp/add_follow_up_record
 */

$ofur_ouid           = $route->bodyParams['ofur_ouid'];                    //跟进人ID
$ofur_osid           = $route->bodyParams['ofur_osid'];                    //跟进用户ID
$ofur_way            = $route->bodyParams['ofur_way'];                     //跟进方式 0-电话跟进 1-微信/短信跟进 2-到店接待 3-其他
$ofur_content        = $route->bodyParams['ofur_content'];                 //跟进结果
$ofur_create_time    = $route->bodyParams['ofur_create_time'];             //跟进时间
$ofur_price          = $route->bodyParams['ofur_price'];             //跟进时间
$next_follow_up_time = $route->bodyParams['ofur_next_follow_up_time'];    //下次跟进时间 0-放弃跟进
$ofur_oesid          = $route->bodyParams['ofur_oesid'];                   //机构id
$ofur_times          = $regexpObj->bodyV($response,$route,'ofur_times','NUMBER');  //跟进次数
$ofur_type           = $regexpObj->bodyV($response,$route,'ofur_type','NUMBER');  //跟进次数
$ofur_name           = $regexpObj->bodyV($response,$route,'ofur_name','NORMAL');  //跟进人名称


//写入数组
$insertArr = [
    'ofur_ouid'                =>$ofur_ouid,
    'ofur_osid'                =>$ofur_osid,
    'ofur_way'                 =>$ofur_way,
    'ofur_content'             =>$ofur_content,
    'ofur_create_time'         =>$ofur_create_time,
    'ofur_next_follow_up_time' =>$next_follow_up_time,
    'ofur_oesid'               =>$ofur_oesid,
    'ofur_times'               =>$ofur_times,
    'ofur_type'                =>$ofur_type,
    'ofur_price'               =>$ofur_price,
    'ofur_name'                =>$ofur_name,
];
//执行写入语句
$rsData = $db->mysqlDB->insert("oa_follow_up_record",$insertArr);

//返回成功结果
$response->responseData( true, $rsData );